from common.base import Base


class LoginPage(Base):
    def input_username(self,username):
        self.find_element(('name','username')).send_keys(username)

    def input_password(self,password):
        self.find_element(('name','password')).send_keys(password)

    def remember(self):
        self.click(('id','remember'))

    def btn_login(self):
        self.click(('class name','loginbtn'))


if __name__ == '__main__':
    login = LoginPage('chrome')
    login.get('https://ecshop.test2.shopex123.com/user.php')

    # 执行测试用例
    login.input_username('lxy')
    login.input_password('123456')
    login.remember()
    login.btn_login()
    login.quit()